package com.dy.design_pattern_study.interpreter_pattern.dome2.impl;

import com.dy.design_pattern_study.interpreter_pattern.dome2.Expression;

/**
 * @CreateBy zhangdingyi
 * @Date 2023-04-24
 * @Content 音速解析器
 */
public class Speed extends Expression {
    @Override
    public void excute(String key, double value) {
        String speed;
        if (value < 500) {
            speed = "快速";
        } else if (value >= 1000) {
            speed = "慢速";
        } else {
            speed = "中速";
        }
        System.out.println("speed = " + speed);
    }
}
